#ifndef QTDBUSINTERFACELOCATION_H
#define QTDBUSINTERFACELOCATION_H

#include <qtdbusextrasglobal.h>

#include <QStringList>

QT_BEGIN_NAMESPACE
class QObject;
class QDBusConnection;
class QDBusConnectionPrivate;
QT_END_NAMESPACE

class QTDBUSEXTRAS_EXPORT QtDBusInterfaceLocation
{
public:
    bool isVaild() const;

    QString path() const;
    QString name() const;
    QObject *object() const;
    int flags() const;

    static QtDBusInterfaceLocation locationOf(const QObject *object, const QDBusConnection &connection);
    static QtDBusInterfaceLocation locationOf(const QObject *object, const QDBusConnectionPrivate *connectionSelf);

protected:
    QtDBusInterfaceLocation(const QStringList &nodes = {}, const void *self = nullptr);

    struct Data
    {
        QStringList nodes;
        const void *self;
    } d;
};

#endif // QTDBUSINTERFACELOCATION_H
